package com.example.ws.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.ws.model.ChatHistory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ChatHistoryMapper extends BaseMapper<ChatHistory>{
    @Select("select * from chat_history where from_user = #{fromUser} and to_user = #{toUser}")
    List<ChatHistory> selectAllChatHistory(@Param("fromUser") String fromUser,@Param("toUser") String toUser);
}
